/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.controller.bean;

import com.entites.Faq;
import com.model.bean.FaqFacadeLocal;
import java.util.ArrayList;
import java.util.List;
import javax.ejb.EJB;
import javax.enterprise.context.Dependent;
import javax.inject.Named;

/**
 *
 * @author VANANH
 */
@Named(value = "fAQBean")
@Dependent
public class FAQBean
{
    @EJB
    private FaqFacadeLocal faqFacade;
    private List<Faq> lst;
    private String question;
    private String answer;
    
    /**
     * Creates a new instance of FAQBean
     */
    public FAQBean()
    {
        lst = new ArrayList<Faq>();
    }

    public FaqFacadeLocal getFaqFacade()
    {
        return faqFacade;
    }

    public void setFaqFacade(FaqFacadeLocal faqFacade)
    {
        this.faqFacade = faqFacade;
    }

    public List<Faq> getLst()
    {
        lst = faqFacade.findAll();
        return lst;
    }

    public void setLst(List<Faq> lst)
    {
        this.lst = lst;
    }

    public String getQuestion()
    {
        return question;
    }

    public void setQuestion(String question)
    {
        this.question = question;
    }

    public String getAnswer()
    {
        return answer;
    }

    public void setAnswer(String answer)
    {
        this.answer = answer;
    }
    
}
